let app = getApp();
Component({
  properties: {
    recommendData: {
      type: Object,
      value: {}
    },
  },
  methods: {
    _onNavigator(e) {
      let { item } = e.currentTarget.dataset;
      let url = item.type;
      let params = { id: item.id };
      if (url == 'ws_micro_shop_pt/pages/pt/details/details'){
        params = { gid: item.id };
      }
      app.util.navigateTo(url, params, '');
    },
    goToEdit() {
      app.util.navigateTo('/common/component/universal-card/pages/editOptional')
    },
  },
  ready() {
    let that = this;
    app.loadCurrencyUnit().then(res => {
      this.setData({
        unit: res.unit,
      });
    });
  },
});
